<template>
  <!--表格详情-->
  <div>
    <table cellspacing="0" cellpadding="0" class="detailTable">
      <tbody>
        <tr>
          <td class="title">发生企业</td>
          <td>{{ detailData.companyName || '--' }}</td>
          <td class="title">统一社会信用代码</td>
          <td>{{ detailData.uscc || '--' }}</td>
        </tr>
        <tr>
          <td class="title">是否发生在项目中</td>
          <td>{{ detailData.projectId ? '是' : '否' }}</td>
          <td class="title">发生项目</td>
          <td>{{ detailData.projectName || '--' }}</td>
        </tr>
        <tr>
          <td class="title">人员姓名</td>
          <td>{{ detailData.name || '--' }}</td>
          <td class="title">身份证号</td>
          <td>{{ detailData.idcard || '--' }}</td>
        </tr>
        <tr>
          <td class="title">发生时间</td>
          <td>{{ detailData.occurrenceDate || '--' }}</td>
          <td class="title">人员职位</td>
          <td>{{ detailData.position || '--' }}</td>
        </tr>
        <tr>
          <td class="title">{{ type == 'BAD' ? '详细记录' : '奖励说明' }}</td>
          <td colspan="3">{{ detailData.description || '--' }}</td>
        </tr>
        <tr>
          <td class="title">事件资料</td>
          <td colspan="3">
            <!-- <template v-for="(item, index) in detailData.fileList">
                  <div class="interval" :key="index">
                    <a
                      target="_blank"
                      class="a_link mouseOn"
                      :href="item.url"
                      >{{ item.originalName || item.name ||"--" }}</a
                    >
                  </div>
                </template> -->
            <el-link type="primary" @click="show()">查看</el-link>
          </td>
        </tr>
      </tbody>
    </table>
    <!-- 上传附件 -->
    <el-dialog
      title="资料"
      :visible.sync="uploadContract"
      :modal-append-to-body="false"
      width="900px"
      :append-to-body="true"
    >
      <contractEnclosure :isShowType="false" :tableData="uploadImg" />
    </el-dialog>
  </div>
</template>
<script>
export default {
  name: 'cecordDetail',
  props: ['detailData', 'type'],
  data() {
    return {
      uploadContract: false,
      uploadImg: [],
    }
  },
  created() {},
  methods: {
    show() {
      this.uploadContract = true
      this.uploadImg = this.detailData.fileList
    },
  },
}
</script>
<style scoped lang="less">
.general {
  color: #6dd400;
}
.import {
  color: #fa6400;
}
.serious {
  color: #e02020;
}
.a_link {
  color: #00a0e9;
}
// }
</style>
